<div class="art-post">
    <div class="art-post-tl"></div>
    <div class="art-post-tr"></div>
    <div class="art-post-bl"></div>
    <div class="art-post-br"></div>
    <div class="art-post-tc"></div>
    <div class="art-post-bc"></div>
    <div class="art-post-cl"></div>
    <div class="art-post-cr"></div>
    <div class="art-post-cc"></div>
    <div class="art-post-body">
        <div class="art-post-inner art-article">
            <h2 class="art-postheader">[Danh sách video]</h2>
            <input type="button" value="Thêm video mới"
                   onclick="window.location='<?php echo Utility::getSiteUrl(); ?>/videos/add'"/>

            <form action="<?php echo Utility::currentUrl(); ?>" method="post">
                <table class="item-list">
                    <thead>
                    <th>[]</th>
                    <th>Tên video</th>
                    <th>Thứ tự</th>
                    <th>Trạng thái</th>
                    <th>Tùy chọn</th>
                    </thead>
                    <tbody>
                    <?php
                $size = $data->getSize();
                    if($size > 0)
                    {
                    for($i = 0;$i < $size; $i++)
                    {
                    $row = $data->getRow($i);
                    ?>
                    <tr>
                        <td><input type="checkbox" name="cb[]" value="<?php echo $row->id; ?>"/></td>
                        <td><a href="<?php echo Utility::getSiteUrl() . '/videos/edit/' . $row->id;?>"
                               title="Sửa"><?php echo $row->title; ?></a></td>
                        <td>
                            <input type="hidden" name="id[]" value="<?php echo $row->id?>" />
                            <input type="text" class="order" name="v<?php echo $row->id;?>" value="<?php echo $row->v_order;?>" />
                        </td>
                        <td><?php echo ($row->status == 1)?"Kích hoạt":"Chưa kích hoạt"; ?></td>
                        <td>
                            <a href="<?php echo Utility::getSiteUrl() . '/videos/edit/' . $row->id;?>" title="Sửa"
                               class="icon-edit"></a>
                            <a href="<?php echo Utility::getSiteUrl() . '/videos/remove/' . $row->id;?>" title="Xóa"
                               class="icon-remove"></a>
                        </td>
                    </tr>
                    <?php
                    }
                    ?>
                    <tr>
                        <td colspan="5">
                            <select name="mass_action">
                                <option value="">Chọn hành động</option>
                                <option value="update_order">Cập nhật thứ tự</option>
                                <option value="remove">Xóa</option>
                            </select>
                            <input type="submit" name="submit" value="Thực hiện"/>
                        </td>
                    </tr>
                    <?php
                }
                else
                {
                    ?>
                    <tr>
                        <td colspan="5"><span class="error-notification"> Chưa có bản ghi nào</span></td>
                    </tr>
                    <?php
                }
                ?>
                    </tbody>
                </table>
            </form>

        </div>

        <div class="cleared"></div>
    </div>
</div>